//
//  unittest2.c
//  Implments a random test of isGameOver() function in dominion.c
//
//  Created by Preston Skaggs on 1/23/14.
//
//

#include <stdio.h>
#include "dominion.h"
#include "dominion_helpers.h"
#include <stdlib.h>
#include "rngs.h"
#include "math.h"

#define NUM_TESTS 2000

int main(){
    
    struct gameState *state = malloc(sizeof(struct gameState));
    int i, n, isOver;
    for (n = 0; n < NUM_TESTS; n++) {
        for (i = 0; i < sizeof(struct gameState); i++) {
            ((char*)state)[i] = floor(Random() * 256);
        }
        state->supplyCount[province] = floor(Random() * 12);
        isOver = isGameOver(state);
        /*if(isOver){
         printf("Game over reached");
         } //more information could be added here but this test is mainly to assess coverage
         else printf("Game not over");
         */
        
    }
    printf("Test completed");
    return 0;
}